DeepSeek-Coder-V2

deepseek/deepseek-coder

Created May 14, 2024128,000 context
$0.04/M input tokens$0.12/M output tokens

DeepSeek-Coder-V2, an open-source Mixture-of-Experts (MoE) code language model. It is further pre-trained from an intermediate checkpoint of DeepSeek-V2 with additional 6 trillion tokens.

The original V1 model was trained from scratch on 2T tokens, with a composition of 87% code and 13% natural language in both English and Chinese. It was pre-trained on project-level code corpus by employing a extra fill-in-the-blank task.

Providers for DeepSeek-Coder-V2

OpenRouter routes requests to the best providers that are able to handle your prompt size and parameters, with fallbacks to maximize uptime.

Context
128K
Max Output
128K
Input
$0.04
Output
$0.12

Apps using DeepSeek-Coder-V2

Top public apps this week using this model

1.
Favicon for https://cline.bot/
Cline
Autonomous coding agent right in your IDE
62.9Mtokens
2.
Favicon for https://roocode.com/
Roo Code
A whole dev team of AI agents in your editor
36.2Mtokens
3.
Favicon for https://openrouter.ai/chat
OpenRouter: Chatroom
Chat with multiple LLMs at once
2.37Mtokens
4.
Favicon for https://aider.chat/
Aider
AI pair programming in your terminal
1.9Mtokens
5.
Favicon for https://openwebui.com/
Open WebUI
Extensible, self-hosted AI interface
1Mtokens
6.
Favicon for https://github.com/HybridTalentComputing/Roo-Code-Chinese
Roo Code Chinese
new
663Ktokens
7.
Favicon for https://sillytavern.app/
SillyTavern
LLM frontend for power users
483Ktokens
8.
Favicon for https://chub.ai/
Chub AI
GenAI for everyone
412Ktokens
9.
Favicon for https://edgar-tidy.com/
EDGAR Tidy App
new
396Ktokens
10.
Favicon for https://docs.all-hands.dev/
OpenHands
AI coding agent that can run commands, browse the web, call APIs
281Ktokens
11.
Favicon for https://voideditor.com/
Void Editor
new
224Ktokens
12.
Favicon for https://litellm.ai/
liteLLM
Open-source library to simplify LLM calls
92Ktokens
13.
Favicon for https://github.com/sera-plz/ai-vault
AI Vault
new
89Ktokens
14.
Favicon for https://multimodel-invest-analyzer.replit.app/
Multi-Model Investment Analyzer
new
68Ktokens
15.
Favicon for https://kilocode.ai/
Kilo Code
new
61Ktokens
16.
Favicon for https://risuai.xyz/
RisuAI
Browse characters, choose models, and chat
54Ktokens
17.
Favicon for https://soundtrack-app.com/
SoundTrack App
new
49Ktokens
18.
Favicon for https://cherry-ai.com/
Cherry Studio
new
39Ktokens
19.
Favicon for https://your-website.com/
My Chat App
new
34Ktokens
20.
Favicon for https://lovable.dev/
Learn LLMs
new
33Ktokens

Recent activity on DeepSeek-Coder-V2

Tokens processed per day

Apr 30May 1May 2May 3May 4May 5May 6May 7May 806.5M13M19.5M26M

Uptime stats for DeepSeek-Coder-V2

Uptime stats for DeepSeek-Coder-V2 on the only provider

When an error occurs in an upstream provider, we can recover by routing to another healthy provider, if your request filters allow it.

Learn more about our load balancing and customization options.

Sample code and API for DeepSeek-Coder-V2

OpenRouter normalizes requests and responses across providers for you.

OpenRouter provides an OpenAI-compatible completion API to 300+ models & providers that you can call directly, or using the OpenAI SDK. Additionally, some third-party SDKs are available.

In the examples below, the OpenRouter-specific headers are optional. Setting them allows your app to appear on the OpenRouter leaderboards.

from openai import OpenAI

client = OpenAI(
  base_url="https://openrouter.ai/api/v1",
  api_key="<OPENROUTER_API_KEY>",
)

completion = client.chat.completions.create(
  extra_headers={
    "HTTP-Referer": "<YOUR_SITE_URL>", # Optional. Site URL for rankings on openrouter.ai.
    "X-Title": "<YOUR_SITE_NAME>", # Optional. Site title for rankings on openrouter.ai.
  },
  extra_body={},
  model="deepseek/deepseek-coder",
  messages=[
    {
      "role": "user",
      "content": "What is the meaning of life?"
    }
  ]
)
print(completion.choices[0].message.content)

Using third-party SDKs

For information about using third-party SDKs and frameworks with OpenRouter, please see our frameworks documentation.

See the Request docs for all possible fields, and Parameters for explanations of specific sampling parameters.

More models from DeepSeek

    DeepSeek-Coder-V2 | OpenRouter